package io_exercise;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;

public class OSWDemo1 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fis1=new FileOutputStream("osw1.txt");
        OutputStreamWriter osw1=new OutputStreamWriter(fis1, StandardCharsets.UTF_8);
        osw1.write("和我在成都的街头走一走，哦哦哦...");
        osw1.write("直到所有的灯都熄灭了也不停留");
        System.out.println("写出完毕!");
        osw1.close();
    }
}
